/**
 * @FileDescription: 认证API
 * @Author: Nevertheless
 * @Date: 2025.4.24
 * @LastEditors: Nevertheless
 * @LastEditTime: 2025.4.24
 */

import request from "../utils/request.js";

/**
 * @description: 用于用户的注册
 * @return {Promise<>} - 返回Promise
 */
export const registerService = (conditions) => {

    return request.post('/auth/register', conditions, {
        headers: {
            'Content-Type': 'application/json'
        }
    });
}

/**
 * @description: 用于用户的登录
 * @return {Promise<>} - 返回Promise
 */
export const loginService = (conditions) => {

    return request.post('/auth/login', conditions, {
        headers: {
            'Content-Type': 'application/json'
        }
    });
}